home *** CD-ROM | disk | FTP | other *** search
/ Power Bytes: Money & Finance / PowerBytes Money and Finance CD-ROM 01 / PowerBytes Money and Finance CD-ROM 01.iso / Demos / TrueBASIC Demo / User's Guide / Interest < prev    next >
Encoding:
Text File  |  1985-06-20  |  557 b   |  18 lines  |  [TEXT/TRUE]

  1. ! Program to compute interest on a bank account.
  2. ! Stop when the money has doubled.
  3. !
  4. LET money = 10000                 ! Start with $10,000
  5. LET original = money              ! Remember original amount
  6.  
  7. LET interest = 8.5/100            ! Interest is 8.5%
  8.  
  9. DO until money >= 2 * original    ! Loop until money doubles
  10.  
  11.    PRINT years, money             ! Print year and money
  12.    LET years = years + 1          ! Keep track of how long
  13.    LET money = money + (interest * money)   ! Add in interest
  14.  
  15. LOOP
  16. PRINT "In"; years ; "years, you'll have $"; money
  17. END
  18.